
# < < < < < < < < < < < < < < <


ifneq ($(strip $(MAKECMDGOALS)),)
target_index:=$(MAKECMDGOALS)
endif

# define sort_target_index
# endef
# target_index:=$(call sort_target_index,$(target_index))


.PHONY: all $(MAKECMDGOALS)
all $(MAKECMDGOALS):
	@if [ ! -e $(FILE_LOCATION)avoidremake ];then \
	if [ ! -e $(FILE_LOCATION)../.gitignore ];then \
		echo output > $(FILE_LOCATION)../.gitignore;\
	fi;\
	mkdir -p $(DIRs);\
	echo ready to build;\
	echo start building;\
	for i in $(target_index);\
		do \
		$(MAKE) TARGET$$i -s -f $(FILE_LOCATION)makefiles/TARGET.mk;\
	done;\
	touch $(FILE_LOCATION)avoidremake;\
	echo :.quit.:;\
	fi
